#!/bin/bash

cd /usr/web/apache-tomcat-8.5.55/webapps

oldname="pm20.war"
newname="pm20.war-"`date "+%Y%m%d%H%M%S"`

if [ -e "$oldname" ]; then
    #备份
    mv $oldname $newname
fi
echo "backup success";